package com.zyh.service.impl;

import com.zyh.entity.Address;
import com.zyh.mapper.AddressMapper;
import com.zyh.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public List<Address> selectByUserId(Integer uId) {
        return addressMapper.selectByUserId(uId);
    }

    @Override
    public void updateByAddrId(Integer aId) {
        addressMapper.updateByAddrId(aId);
    }

    @Override
    public void updateByUid(Integer uId) {
        addressMapper.updateByUid(uId);
    }

    @Override
    public void updateDeleteState(Integer aId) {
        addressMapper.updateDeleteState(aId);
    }

    @Override
    public void insert(Address address) {
        addressMapper.insert(address);
    }
}
